package com.ruoyi.system.domain.bo;

import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.core.validate.AddGroup;
import com.ruoyi.common.core.validate.EditGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 心理咨询文章业务对象 p_article
 *
 * @author ruoyi
 * @date 2022-07-28
 */

@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel("心理咨询文章业务对象")
public class PArticleBo extends BaseEntity {

    /**
     *
     */
    @ApiModelProperty(value = "", required = true)
    @NotNull(message = "不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 文章标题
     */
    @ApiModelProperty(value = "文章标题", required = true)
    @NotBlank(message = "文章标题不能为空", groups = { AddGroup.class, EditGroup.class })
    private String title;

    /**
     * 发布人id
     */
    @ApiModelProperty(value = "发布人id", required = true)
    private Long userId;

    /**
     * 阅读人数
     */
    @ApiModelProperty(value = "阅读人数", required = true)
    private Long readNum;

    /**
     * 内容
     */
    @ApiModelProperty(value = "内容", required = true)
    @NotBlank(message = "内容不能为空", groups = { AddGroup.class, EditGroup.class })
    private String info;

    /**
     * 审核状态 0 待审批 1 未通过 2 通过
     */
    @ApiModelProperty(value = "审核状态 0 待审批 1 未通过 2 通过", required = true)
    private String status;

    /**
     * 分类id
     */
    @ApiModelProperty(value = "分类id", required = true)
    private Long categoryId;

    @ApiModelProperty(value = "封面")
    private String pic;

    @ApiModelProperty("发布人名称")
    private String username;
}
